//
//  MainTabBarController.m
//  PlayerWorld
//
//  Created by 1 on 16/5/16.
//  Copyright © 2016年 刘成. All rights reserved.
//

#import "MainTabBarController.h"
#import "HighLightsViewController.h"
#import "ProcurementHallViewController.h"
#import "LotteryInformationViewController.h"
#import "MyAccountViewController.h"

@interface MainTabBarController ()

@end

@implementation MainTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    
        UITabBarController *tabBar = [[UITabBarController alloc] init];
        HighLightsViewController *hlVC = [[HighLightsViewController alloc] init];
        UINavigationController *nav1 = [[UINavigationController alloc] initWithRootViewController:hlVC];
        nav1.tabBarItem.image = [UIImage imageNamed:@"标签1"];
        nav1.tabBarItem.selectedImage = [[UIImage imageNamed:@"标签1_Sel"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    [nav1.tabBarItem setImageInsets:UIEdgeInsetsMake(4, 0, -4, 0)];
        nav1.tabBarItem.title = @"";
        [nav1.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithRed:187/255.0f green:169/255.0f blue:181/255.0f alpha:1]} forState:UIControlStateNormal];
    
        ProcurementHallViewController *phVC = [[ProcurementHallViewController alloc]init];
        UINavigationController *nav2 = [[UINavigationController alloc]initWithRootViewController:phVC];
        nav2.tabBarItem.image = [UIImage imageNamed:@"标签2"];
        nav2.tabBarItem.selectedImage = [[UIImage imageNamed:@"标签2_Sel"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    [nav2.tabBarItem setImageInsets:UIEdgeInsetsMake(4, 0, -4, 0)];
//        nav2.tabBarItem.title = @"购彩大厅";
        [nav2.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithRed:187/255.0f green:169/255.0f blue:181/255.0f alpha:1]} forState:UIControlStateNormal];
    
        LotteryInformationViewController *liVC = [[LotteryInformationViewController alloc]init];
        UINavigationController *nav3 = [[UINavigationController alloc]initWithRootViewController:liVC];
        nav3.tabBarItem.image = [UIImage imageNamed:@"标签3"];
        nav3.tabBarItem.selectedImage = [[UIImage imageNamed:@"标签3_Sel"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    [nav3.tabBarItem setImageInsets:UIEdgeInsetsMake(4, 0, -4, 0)];
//        nav3.tabBarItem.title = @"开奖信息";
        [nav3.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithRed:187/255.0f green:169/255.0f blue:181/255.0f alpha:1]} forState:UIControlStateNormal];
    
        MyAccountViewController *maVC = [[MyAccountViewController alloc]init];
        UINavigationController *nav4 = [[UINavigationController alloc]initWithRootViewController:maVC];
        nav4.tabBarItem.image = [UIImage imageNamed:@"标签4"];
        nav4.tabBarItem.selectedImage = [[UIImage imageNamed:@"标签4_Sel"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    [nav4.tabBarItem setImageInsets:UIEdgeInsetsMake(4, 0, -4, 0)];
//        nav4.tabBarItem.title = @"我的账户";
        [nav4.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithRed:187/255.0f green:169/255.0f blue:181/255.0f alpha:1]} forState:UIControlStateNormal];
    
    tabBar.viewControllers = @[nav1,nav2,nav3,nav4];
    self.viewControllers = tabBar.viewControllers;

}


@end
